#pragma once
#include <YSimpleNetwork/YTcpSession.h>
#include <YSimpleNetwork/YProactorTokenOnConnect.h>

namespace ysimple_network
{
	class YTcpClientSession 
		: public YTcpSession
	{
		std::function<void()>			m_releaseFunctor;
		YProactorTokenOnConnect	m_connectToken;
	public:
		YTcpClientSession(ysimple_system::IProactor& proactor, SOCKET socket, bool reusedSocket, RELEASE_TCP_SESSION_FUNCTOR releaseFunctor);
		virtual ~YTcpClientSession(void);

		bool				connect(const std::string& ip, WORD port, IConnectCallback& callback) override;
		bool				accept( ITCPSession& listenSession, IAcceptCallback& callback) override { return false; }
		bool				listen(const YEndPoint& endPoint, int backlog) override { return false; }
	};

}

